package com.example.springdemo.design_model.contrete;

/**
 * @author zhangding
 * @date
 */
public class HouseDirector {
    HouseBuilder houseBuilder = null;

    /**
     * 传入构造器
     * @param houseBuilder
     */
    public void setHouseBuilder(HouseBuilder houseBuilder){
        this.houseBuilder = houseBuilder;
    }

    /**
     * 建造房子
     * @return
     */
    public House contreteHouse(){
        houseBuilder.buildWall();
        houseBuilder.buildRoofed();
        return houseBuilder.buildHouse();
    }
}
